<layout name="layout" />

<script src="__CDN__/Scripts/PSI/AFX/BaseOneGridMainForm.js?dt={$Think.config.site.version}" type="text/javascript"></script>

<script src="__CDN__/Scripts/PSI/Warehouse/MainForm.js?dt={$Think.config.site.version}" type="text/javascript"></script>
<script src="__CDN__/Scripts/PSI/Warehouse/EditForm.js?dt={$Think.config.site.version}" type="text/javascript"></script>
<script src="__CDN__/Scripts/PSI/Warehouse/EditDataOrgForm.js?dt={$Think.config.site.version}" type="text/javascript"></script>
<script src="__CDN__/Scripts/PSI/User/SelectUserDataOrg.js?dt={$Think.config.site.version}" type="text/javascript"></script>
<script src="__CDN__/Scripts/PSI/User/OrgField.js?dt={$Think.config.site.version}" type="text/javascript"></script>

<script>
  Ext.onReady(function () {
    PSI.Const.PROD_NAME = "{$site.name|mb_substr=0,4,'utf-8'|mb_strtoupper='utf-8'}";

    var app = Ext.create("PSI.App", {
      userName: "{$admin.username}",
      productionName: "{$site.name|mb_substr=0,4,'utf-8'|mb_strtoupper='utf-8'}",
      appHeaderInfo: {
        title: "{$title}",
        iconCls: "PSI-fid1003"
      }
    });

    app.add(Ext.create("PSI.Warehouse.MainForm", {
      pAdd: "{$pAdd}",
      pEdit: "{$pEdit}",
      pDelete: "{$pDelete}",
      pEditDataOrg: "{$pEditDataOrg}",
      pInitInv: "{$pInitInv}"
    }));
  });
</script>
